package junior.db.dao.mybatis.interceptor;

import org.apache.ibatis.session.Configuration;

/**
 * @author wubo
 * @date 2025/3/11 11:34
 */
public class MybatisConfigurationHolder {
    private static ThreadLocal<Configuration> holder = new ThreadLocal<>();
    
    public static Configuration getConfiguration() {
        return holder.get();
    }
    
    public static void setConfiguration(Configuration configuration) {
        holder.set(configuration);
    }
    
    public static void clear() {
        holder.remove();
    }
}
